SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_DeleteTabModule]
	@TabId      int,
	@ModuleId   int,
	@SoftDelete	bit
AS
	IF @SoftDelete = 1
		UPDATE dbo.DnnProduct_TabModules
			SET	IsDeleted = 1,
				VersionGuid = newId()
		WHERE  TabId = @TabId
			AND    ModuleId = @ModuleId
	ELSE
		DELETE
		FROM   dbo.DnnProduct_TabModules 
		WHERE  TabId = @TabId
			AND    ModuleId = @ModuleId

GO
